#pragma once

class InputKeyboard : public InputDevice
{
public:
	InputKeyboard(void);
	~InputKeyboard(void);

	void update(float dt);

	bool isKeyDown(int key) const;
	bool didKeyJustGoDown(int key) const;
	bool didKeyJustGoUp(int key) const;
	void getMove(MoveParam& mp) const;

private:
	void registerKeys();
	inline bool isKeyDownInState(int state, int key) const;

private:
	static const int MAX_NUM_KEY_CODE = 256;

	vec4f mousePositionCurrent;
	vec4f mousePositionLast;
	int currentState;
	unsigned char keyState[2][MAX_NUM_KEY_CODE];
};
